<template>
  <div v-loading="loading" class="main" style="overflow-y: auto">
    <div class="title">
      <span class="logo" />
      标题
      <div class="time">
        <img src="../assets/robot/time.png">
        <span> {{ time }}</span>
      </div>
    </div>
    <div class="layout_content">
      <grid-layout
        :layout.sync="layout"
        :col-num="12"
        :row-height="40"
        :is-draggable="false"
        :is-resizable="false"
        :vertical-compact="true"
        :use-css-transforms="true"
      >
        <!-- IkLineBaseChart -->
        <grid-item
          :x="0"
          :y="0"
          :w="3"
          :h="6"
          :i="0"
        >
          <span class="layout_content_span">
            <ik-line-base-chart
              code="1"
              title="测试表"
            />
          </span>
        </grid-item>

        <!-- IkLineMathChart -->
        <grid-item
          :x="0"
          :y="7"
          :w="3"
          :h="6"
          :i="0"
        >
          <span class="layout_content_span">
            <ik-line-math-chart
              code="2"
              title="测试表"
            />
          </span>
        </grid-item>

        <!-- IkLineSmoothChart -->
        <grid-item
          :x="9"
          :y="0"
          :w="3"
          :h="6"
          :i="0"
        >
          <span class="layout_content_span">
            <ik-line-smooth-chart
              code="3"
              title="测试表"
            />
          </span>
        </grid-item>

        <!-- IkLineStepChart -->
        <grid-item
          :x="9"
          :y="7"
          :w="3"
          :h="6"
          :i="0"
        >
          <span class="layout_content_span">
            <ik-line-step-chart
              code="4"
              title="测试表"
            />
          </span>
        </grid-item>

        <!-- IkLineTimeChart -->
        <grid-item
          :x="4"
          :y="7"
          :w="4"
          :h="6"
          :i="0"
        >
          <span class="layout_content_span">
            <ik-line-time-chart
              code="5"
              title="测试表"
            />
          </span>
        </grid-item>

      </grid-layout>
    </div>
  </div>
</template>

<script>

import { GridLayout, GridItem } from "vue-grid-layout"
// bar
import IkLineBaseChart from "@/views/frame/board/components/ik/echarts/chart/line/base/IkLineBaseChart"
import IkLineMathChart from "@/views/frame/board/components/ik/echarts/chart/line/math/IkLineMathChart"
import IkLineSmoothChart from "@/views/frame/board/components/ik/echarts/chart/line/smooth/IkLineSmoothChart"
import IkLineStepChart from "@/views/frame/board/components/ik/echarts/chart/line/step/IkLineStepChart"
import IkLineTimeChart from "@/views/frame/board/components/ik/echarts/chart/line/time/IkLineTimeChart"

export default {
  components: {
    GridLayout,
    GridItem,
    // Chart
    IkLineBaseChart,
    IkLineMathChart,
    IkLineSmoothChart,
    IkLineStepChart,
    IkLineTimeChart
  },
  data() {
    return {
      loading: false,
      time: '2023-12-01 02:09:01',
      layout: [
        { "x": 1, "y": 1, "w": 1, "h": 1, "i": 1 },
        { "x": 1, "y": 1, "w": 1, "h": 1, "i": 2 },
        { "x": 1, "y": 1, "w": 1, "h": 1, "i": 3 },
        { "x": 1, "y": 1, "w": 1, "h": 1, "i": 4 }
      ]
    }
  },
  watch: {
    time(val) {
      this.time = val
    }
  },
  created() {
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.main {
  overflow: auto !important;

  width: 100%;
  min-height: 1080px;
  background-image: url("../assets/robot/bgmap2.png");
  position: relative;
  // overflow: auto;
  .title {
    height: 50px;
    width: 100%;
    position: absolute;
    top: 0;
    line-height: 50px;
    text-align: center;
    // background-color: red;
    z-index: 99;
    background-image: url("../assets/robot/title.png");
    background-size: 100% 100%;
    color: white;
    font-weight: 800;
    .logo {
      position: absolute;
      left: 0;
      height: 70%;
      top: 17%;
      width: 155px;
      background-image: url("../assets/robot/logo.png");
      background-size: 100% 100%;
    }
    .time {
      position: absolute;
      right: 15px;
      line-height: 50px;
      font-size: 13px;
      height: 50px;
      top: 0;
      img {
        height: 30px;
        line-height: 30px;
        vertical-align: middle;
        margin: 0 5px 0 0;
        padding: 0;
      }
      span {
        vertical-align: middle;
      }
    }
    .el-image {
      width: 100%;
      height: 100%;
      position: absolute;
      ::v-deep.el-image__inner {
        margin: 0 !important;
      }
    }
  }
  .layout_content {
    position: relative;
    background-image: url("../assets/robot/bgmap2.png");
    width: 100%;
    min-height: 100%;
    height: calc(100% - 50px);
    top: 50px;
    .el-card {
      border: 0px;
    }
  }
}
</style>

<style lang="scss">
@import "../styles/robot/robot.scss";
// @import '../../styles/robot/default.scss';
</style>
